home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 103
/
Vol 103.iso
/
games
/
starship.swf
/
scripts
/
DefineSprite_89
/
frame_1
/
DoAction.as
Wrap
Text File
|
2010-03-13
|
774b
|
36 lines
function init()
{
var i = 1;
while(_root.cst.maxObjects >= i)
{
tellTarget("../object_" + i)
{
_root.temp.objectFrames = _totalframes;
}
if(Number(_root.temp.objectFrames) == 0)
{
_name = "object_" + i;
break;
}
i++;
}
gotoAndStop(1);
}
function hit()
{
if(active == true)
{
_parent._parent._parent.ship.actEnergy += 70;
if(_parent._parent._parent.ship.maxEnergy < _parent._parent._parent.ship.actEnergy)
{
_parent._parent._parent.ship.actEnergy = _parent._parent._parent.ship.maxEnergy;
}
_parent._parent._parent.ship.refreshEnergy();
active = false;
play();
}
}
active = true;
stop();
init();